#ifndef __GYRO_H__
#define __GYRO_H__

#include <opencv2/opencv.hpp>
#include "armor_recognition.h" //装甲识别
#include <iostream>
using namespace cv;
using namespace std;

enum dir {LEFT, RIGHT, MOVELESS};

class Gyro
{
public:

    //扩大roi至装甲板会出现的所有区域
    int RoiGyro(float x, float y, float width, float height, int id, Mat frame, Rect RoiRect);

    //得到旋转方向
    dir GetDirection(dir direction);

    //清理小陀螺数据
    void Clear();
    
    //框出的装甲板
    RotatedRect smallGyro;
    
    float left_x_, left_y_, right_x_, right_y_;
    
    int fcount_ = 0;

    int armor_id_ = 0;

    dir direction_;// LEFT  RIGHT MOVELESS

private:

    vector<dir> vdirection;

    float center_;

};

#endif

